import React from 'react';
import ReactDom from 'react-dom';

import { createStore, applyMiddleware } from 'redux'
import thunkMiddleware from 'redux-thunk'
import { createLogger } from 'redux-logger'

import profile from './reducers'
import App from './App';

const loggerMiddleware = createLogger()
const store = createStore(profile,
  applyMiddleware(
    thunkMiddleware, // lets us dispatch() functions
    loggerMiddleware // neat middleware that logs actions
  ))

ReactDom.render((
  <App store={store}/>), document.getElementById('root'));